import React, { Component } from 'react'
import PubSub from "pubsub-js"

export default class comment extends Component {
    constructor(props){
        super(props)
        this.state = {}
    }
    changeContext = (event) => {
        // this.props.addContext(event.target.value)
        PubSub.publish("addContext",event.target.value)
    }
    render() {
        return (
            <div>
                评论内容<br></br>
                <textarea rows="5" cols="20" onChange={this.changeContext} />
            </div>
        )
    }
}
